/*   **********************************************************************  **
 **   Copyright notice                                                       **
 **                                                                          **
 **   (c) 2009, Around(J2)ME				                                 **
 **   All rights reserved.                                                   **
 **                                                                          **
 **   This program and the accompanying materials are made available under   **
 **   the terms of the New BSD License which accompanies this    			 **
 **   distribution.											                 **
 **   A copy is found in the textfile LICENSE.txt							 **
 **                                                                          **
 **   This copyright notice MUST APPEAR in all copies of the file!           **
 **                                                                          **
 **   Main developers:                                                       **
 **     Juri Strumpflohner		http://blog.js-development.com	             **
 **		Matthias Braunhofer		http://matthias.jimdo.com                    **
 **                                                                          **
 **  **********************************************************************  */

package org.aroundme.model;

import java.util.ArrayList;
/**
 * business class representing a Search. It contains
 * information such as OR-couples, and keywords etc..
 */
public class Search {
	private String filter;
	private ArrayList<String> keywordsAND;
	private ArrayList<String> keywordsOR;
	
	public Search(String filter) {
		this.filter = filter;
		this.keywordsAND = new ArrayList<String>();
		this.keywordsOR = new ArrayList<String>();
	}

	public String getFilter() {
		return filter;
	}

	public void setFilter(String filter) {
		this.filter = filter;
	}

	public ArrayList<String> getKeywordsAND() {
		return keywordsAND;
	}

	public void setKeywordsAND(ArrayList<String> keywords) {
		this.keywordsAND = keywords;
	}
	
	public ArrayList<String> getKeywordsOR() {
		return keywordsOR;
	}

	public void setKeywordsOR(ArrayList<String> keywordsOR) {
		this.keywordsOR = keywordsOR;
	}

	public void addKeywordAND(String keyword){
		this.keywordsAND.add(keyword);
	}
	
	public void removeKeywordAND(String keyword){
		this.keywordsAND.remove(keyword);
	}
	
	public void addKeywordOR(String keyword){
		this.keywordsOR.add(keyword);
	}
	
	public void removeKeywordOR(String keyword){
		this.keywordsOR.add(keyword);
	}
}
